
 var dictGender = $.appCache.get('dict_gender');//性别字典
 var dictEducation = $.appCache.get('dict_education');//学历字典
 var dictEmployestate = $.appCache.get('dict_employestate');//就业状态字典
$('#remindGrid').datagrid({    
    singleSelect:true,
    pagination:true,
    pagePosition:'bottom',
    idField:'PersoninfoId',
    url:'labor/management/getLaborInfoList',  
    rownumbers:true,
    columns:[[ 
        {field:'personinfoId',title:'主键',hidden:'ture'},
        {field:'name',title:'姓名',width:'10%',},    
        {field:'sex',title:'性别',width:'5%',
        	formatter:function(value){
        		if(!dictGender || !dictGender.length) {
          		   return value;
          	   } else {
          		   var i = 0;
              	   for(i; i<dictGender.length; i++) {
              		   var dictGenderData = dictGender[i];
              		   if(value == dictGenderData.code) {
              			   return dictGenderData.name;
              		   }
              	   }
          	   }
        }},    
        {field:'idcard',title:'身份证',width:'15%',fitColumns:true},   
        {field:'education',title:'学历',width:'8%',fitColumns:true,
        	formatter:function(value){
        		if(!dictEducation || !dictEducation.length) {
          		   return value;
          	   } else {
          		   var i = 0;
              	   for(i; i<dictEducation.length; i++) {
              		   var dictEducationData = dictEducation[i];
              		   if(value == dictEducationData.code) {
              			   return dictEducationData.name;
              		   }
              	   }
          	   }
        }},    
        {field:'phone',title:'联系方式',width:'12%'},    
        {field:'status',title:'就业状态',width:'10%',fitColumns:true,
        	formatter:function(value){
        		if(!dictEmployestate || !dictEmployestate.length) {
          		   return value;
          	   } else {
          		   var i = 0;
              	   for(i; i<dictEmployestate.length; i++) {
              		   var dictEmployestateData = dictEmployestate[i];
              		   if(value == dictEmployestateData.code) {
              			   return dictEmployestateData.name;
              		   }
              	   }
          	   }
        }},   
        {field:'company',title:'所在单位',width:'23%'},    
        {field:'unemploymentdate',title:'预计退休时间',width:'15%'},    
    ]]
    
}); 


function remindSearch(){
	$('#remindGrid').datagrid({
		url:'labor/management/getLaborInfoList',
		queryParams:{
	    	name:$('#remind_name').val(),
	    	idcard:$('#remind_idCard').val()
		},
	});
}
